package com.ruicar.afs.cloud.account.dto.atom;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.ruicar.afs.cloud.bizcommon.enums.rules.RuleStatus;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

@Data
public class VoucherRuleInfoDto {
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    @ApiModelProperty("规则编号")
    @NotBlank(message = "规则编号不能为空")
    private String ruleNo ;

    @ApiModelProperty("规则名称")
    @NotBlank(message = "规则名称不能为空")
    private String ruleName ;

    @ApiModelProperty("所属规则组")
    @NotBlank(message = "所属规则组不能为空")
    private String ruleGroup ;

    @ApiModelProperty("中文语言")
    @NotBlank(message = "中文语言不能为空")
    private String chineseLang ;

    @ApiModelProperty("程序语言")
    @NotBlank(message = "程序语言不能为空")
    private String programLang ;
    /** 优先级 */
    private Integer sortOrder ;
    /** 有效期起 */
    private String activeStartDate ;
    /** 有效期止 */
    private String activeEndDate ;
    /** 状态;new-创建
     active-生效
     expired-失效 */
    private RuleStatus status ;

    private String ruleOut;

    private int ruleVersion;

    private String ruleData;

    private boolean validate;

    @JsonSerialize(using = ToStringSerializer.class)
    @NotNull(message = "凭证ID不能为空")
    private Long entryId;

}
